Fix for resource not available in ResourceScriptEvaluator#67
Open
Avinash1423 wants to merge 3 commits intoapache:masterfrom
Open
Fix for resource not available in ResourceScriptEvaluator#67Avinash1423 wants to merge 3 commits intoapache:masterfrom
Avinash1423 wants to merge 3 commits intoapache:masterfrom
Conversation
Signed-off-by: Avinash Niyas <avinashNiyaz1423@gmail.com>
elharo
requested changes
Dec 29, 2025
|
|
||
| /** | ||
| * @param engineName optional engine name, used to override the engine selection from the file extension | ||
| * @param engineName optional engine name, used to override the engine selection from the file extension |
|
|
||
| /** | ||
| * @param engine the script engine | ||
| * @param engine the script engine |
| return engine.eval(reader, context); | ||
| try (InputStream is = this.getClass().getClassLoader().getResourceAsStream(resourceName)) { | ||
|
|
||
| if (is == null) throw new ScriptException("Resource not found : " + resourceName); |
Contributor
There was a problem hiding this comment.
Error: src/main/java/org/apache/maven/plugins/scripting/ResourceScriptEvaluator.java:[71,13] (blocks) NeedBraces: 'if' construct must use '{}'s.
elharo
reviewed
Dec 29, 2025
Contributor
elharo
left a comment
There was a problem hiding this comment.
Have you signed the Apache CLA?
Signed-off-by: Avinash Niyas <avinashNiyaz1423@gmail.com>
Author
yes signed and emailed it; pls take a look now |
elharo
reviewed
Dec 30, 2025
| try (InputStream is = this.getClass().getClassLoader().getResourceAsStream(resourceName)) { | ||
|
|
||
| if (is == null) { | ||
| throw new ScriptException("Resource not found : " + resourceName); |
elharo
reviewed
Dec 30, 2025
Contributor
elharo
left a comment
There was a problem hiding this comment.
Run 'mvn spotless:apply' to fix these violations.
Signed-off-by: Avinash Niyas <avinashNiyaz1423@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added Null check and throw of a ScriptException if resource is not available
fixes #66